package com.zhsq.zlc.service.roleAuthority;

import java.util.List;
import java.util.Map;

import com.zhsq.zlc.dao.roleAuthority.RoleAuthorityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RoleAuthorityServiceImpl implements RoleAuthorityService {

	@Autowired
	private RoleAuthorityMapper roleAuthorityMapper;

	@Override
	public void batchInsertRoleAuthortity(List<Map<String, Object>> list)throws Exception {
		roleAuthorityMapper.batchInsertRoleAuthortity(list);
	}

	@Override
	public List<Integer> getAuthorityIdsByRoleId(Integer roleId) throws Exception {
		return roleAuthorityMapper.getAuthorityIdsByRoleId(roleId);
	}
	
	@Override
	public void deleteAuthorityByRoleId(Integer roleId) throws Exception {
		roleAuthorityMapper.deleteAuthorityByRoleId(roleId);
	}
}
